<include file="public/header" />
<div class="page-content">
<div id="spacemanage"></div>
<div id="desmenu">
	<div id="movediv">
    	<div id="fold"><a href="javascript:;" id="menu_co">全部折叠</a></div>
        <div id="searchdiv">
        <form id="cform" name="cform" method="post" action="__URL__/">
        	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="gray">
  <tr>
    <td>检索一级目录：<input type="text" name="search" id="search" class="htinputcss" /><input type="button" name="addbtn" id="addbtn" class="ssbtn" value="搜索" onClick="this.form.action='__URL__';this.form.submit()" onFocus="this.blur()"  /></td>
    <td>&nbsp;</td>
  </tr>
</table>
	</form>
        </div>
        <div id="column" class="gray"><img src="__PUBLIC__/admin/images/addcon.png" alt="内容管理" />:内容管理&nbsp;&nbsp;<img src="__PUBLIC__/admin/images/addcol.png" alt="栏目添加" />:栏目添加&nbsp;&nbsp;<img src="__PUBLIC__/admin/images/editcol.png" alt="栏目修改" />:栏目修改&nbsp;&nbsp;<img src="__PUBLIC__/admin/images/delcol.png" alt="栏目删除" />:栏目删除&nbsp;</div>
    </div>
</div>
<div id="topmenu">
	<div id="movediv" class="gray">
    	<div style="width:50%;height:100%;float:left;">栏目名称</div>
        <div style="width:20%;height:100%;float:left;">栏目管理</div>
        <div style="width:25%;height:100%;float:left;">栏目排序</div>
        <div style="width:5%;height:100%;float:left;">栏目删除</div>
    </div>
</div>
<div id="colmain" class="backfont">
<if condition="$total gt 0">
	<div id="showmenu">{?$menu?}</div>
<else />
    <center>没有找到相关栏目，请输入一级栏目的名称。</center>
</if>
</div>
</div>
<script type="text/javascript">

//栏目排序
function ajxorder(action,pid,id,num){
	$.get("__URL__/corder",{action:action,pid:pid,id:id,num:num,date:new Date().getTime()},function(data){
			$("#showmenu").html(data);
	})
}

	$("#menu_co").click(function(){
		if($(".pdiv").attr("pvar")=='1'){
			$(".pdiv").css("display","none").attr("pvar",'0');
			$(this).html('全部展开');
			$(".pdiv").prev('div[onclick]').children(".movediv").children("div").children('img').attr("src","__PUBLIC__/admin/images/plus.jpg");
			$(".pdiv").prev('div[onclick]').children(".movediv").children("div").children("div").children('img').attr("src","__PUBLIC__/admin/images/plus.jpg");
			$(".pdiv").prev().removeClass("outerdiv2").addClass("outerdiv");
			$(".pdiv").prev().css("background-color","");
		}else{
			$(".pdiv").css("display","block").attr("pvar",'1');
			$(this).html('全部折叠');
			$(".pdiv").prev('div[onclick]').children(".movediv").children("div").children('img').attr("src","__PUBLIC__/admin/images/minsign.jpg");
			$(".pdiv").prev('div[onclick]').children(".movediv").children("div").children("div").children('img').attr("src","__PUBLIC__/admin/images/minsign.jpg");
			$(".pdiv").prev().removeClass("outerdiv").addClass("outerdiv2");

		}
	});

	//鼠标滑过变色
	var oColor=null;
	function overColumn(my){
		oColor=$(my).css("background-color");
		$(my).css("background-color","#e5e4e4");

	}
	function outColumn(my){
		my.style.background=oColor;
		$(my).css("background-color",oColor);
	}

	//点击栏目折叠展开
	function oncard(id){
		var cid=$("#c"+id);
		if(cid.next().is(":visible")){//隐藏
			cid.css("background-color","#FFF");
			cid.next().css("display","none");
			cid.children(".movediv").children("div").children("img").attr('src','__PUBLIC__/admin/images/plus.jpg');
			cid.children(".movediv").children("div").children("div").children("img").attr('src','__PUBLIC__/admin/images/plus.jpg');
			cid.removeClass("outerdiv2").addClass("outerdiv");
		}else{//显示
			cid.next().css("display","block");
			cid.children(".movediv").children("div").children("img").attr('src','__PUBLIC__/admin/images/minsign.jpg');
			cid.children(".movediv").children("div").children("div").children("img").attr('src','__PUBLIC__/admin/images/minsign.jpg');
			cid.removeClass("outerdiv").addClass("outerdiv2");
		}
	}
</script>
</body>
</html>
